package com.android1.amarena2d.test;

import com.android1.amarena2d.input.ScrollController;
import com.android1.amarena2d.nodes.Scene;
import com.android1.amarena2d.nodes.layer.ScrollableRepeatingBackground;
import com.android1.amarena2d.texture.ManagedTexture;
import com.android1.amarena2d.texture.TextureOptions;

public class BackgroundExampleScene extends Scene {


    public BackgroundExampleScene() {


        ManagedTexture texture = engine.getTextureManager().getTexture("assets/toad.png", TextureOptions.REPEATING);

//        StaticBackground b = new StaticBackground(new RepeatingTexturedMesh(texture));
//        add(b);

        ScrollableRepeatingBackground b = new ScrollableRepeatingBackground("assets/toad.png");
        add(b);
        b.touch().makeTouchable(new ScrollController(b)).setTranslateToScreen();

//        final SharedSprite cloud1 = new SharedSprite("assets/toad.png", 250, 150);
//        add(cloud1);


//        add(new SimpleLabel("(Drag the Screen.)", 100, 20, Color.BLACK));


    }


}